package cn.lynch.bbs.domain;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 回复
 * @author lynch
 *
 */
public class Reply {
	
	private String id;
	
	private String title;
	
	private String content;
	
	private User author;
	
	private Date postTime;
	
	private String postIPAddress;
	
	private boolean available;
	
	private int floor;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public User getAuthor() {
		return author;
	}

	public void setAuthor(User author) {
		this.author = author;
	}

	public Date getPostTime() {
		return postTime;
	}

	public void setPostTime(Date postTime) {
		this.postTime = postTime;
	}

	public String getPostIPAddress() {
		return postIPAddress;
	}

	public void setPostIPAddress(String postIPAddress) {
		this.postIPAddress = postIPAddress;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}

	/**
	 * 所属主题
	 */
	private Topic topic;
	
	/**
	 * 附件
	 */
	private Set<Attachment> attachments = new HashSet<Attachment>(0);
	
	

	public boolean hasAttachments() {
		return getAttachments().size() > 0;
	}

	public Set<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(Set<Attachment> attachments) {
		this.attachments = attachments;
	}

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

	public int getFloor() {
		return floor;
	}

	public void setFloor(int floor) {
		this.floor = floor;
	}
	
}
